package com.fengxing.ams.web.facade.mouble.company;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

public interface ICompanyImportDAO extends PagingAndSortingRepository<CompanyImportVO, Integer>, JpaSpecificationExecutor<CompanyImportVO>  {

	@Query(value="select id from zyt_enterprise", nativeQuery=true)
	List<String> findAllIds();

	@Modifying
	@Query(value="delete from zyt_enterprise where id in (:id)", nativeQuery=true)
	void deleteByIds(@Param("id")List<String> ids);

	@Query(value="select email from zyt_enterprise", nativeQuery=true)
	List<String> findAllEmail();

	@Query(value="select max(id) from zyt_enterprise", nativeQuery=true)
	String findMaxId();
}

